/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.proposeproduct.entity.ProposeProduct
   Module Description   :

   Date Created      : 2009/11/16
   Original Author   : ellen.li
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.proposeproduct.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlTransient;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Parameter;

import com.yaodian100.core.common.entity.BaseEntity;
import com.yaodian100.ec.category.entity.Category;

/**
 * @author ellen.li
 * 
 */
@Entity
@Table(name = "EC_PROPOSEPORDUCT_MAIN")
public class ProposeProduct extends BaseEntity {

	/* serial version */
	private static final long serialVersionUID = -8842811025561630034L;

	@Id
	@GeneratedValue(generator = "seq_ec_proposeproduct")
	@GenericGenerator(name = "seq_ec_proposeproduct", strategy = "com.yaodian100.core.common.dao.hibernate.SeqStringGenerator", parameters = {
			@Parameter(name = "sequence", value = "SEQ_EC_PROPOSEPRODUCT"), @Parameter(name = "pattern", value = "00000000") })
	@Column(name = "PRPS_ID", length = 8)
	private String id;

	@Column(name = "PRPS_NAME", length = 500)
	private String name;

	@Column(name = "PRPS_TYPE")
	private int type;

	@Column(name = "IS_VIRTUAL", length = 1)
	private String isVirtual;

	@Column(name = "PROPOSE_CATEGORY_ID")
	private int proposeCategoryId;

	@XmlTransient
	@NotFound(action = NotFoundAction.IGNORE)
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PROPOSE_CATEGORY_ID", insertable = false, updatable = false)
	private Category category;

	@Column(name = "PRPS_COST", columnDefinition = "numeric(10,2)")
	private BigDecimal cost;

	@Column(name = "LIST_PRICE", columnDefinition = "numeric(10,2)")
	private BigDecimal listPrice;

	@Column(name = "PRPS_BRIEF", length = 100)
	private String brief;

	@Column(name = "PRPS_DESCRIPTION", length = 100)
	private String description;

	@Column(name = "PRPS_DETAILS", length = 100)
	private String details;

	@Column(name = "PRPS_BRAND", length = 100)
	private String brand;

	@Column(name = "TAX_CLASS", length = 100)
	private String taxClass;

	@Column(name = "IS_DELETE", length = 1)
	private String isDelete;

	@Column(name = "PRPS_LENGTH", columnDefinition = "numeric(10,2)")
	private BigDecimal length;

	@Column(name = "PRPS_WIDTH", columnDefinition = "numeric(10,2)")
	private BigDecimal width;

	@Column(name = "PRPS_HEIGHT", columnDefinition = "numeric(10,2)")
	private BigDecimal height;

	@Column(name = "PRPS_WEIGHT", columnDefinition = "numeric(10,2)")
	private BigDecimal weight;

	@Column(name = "PRPS_VOLUME", columnDefinition = "numeric(10,2)")
	private BigDecimal volume;

	@Column(name = "PRPS_UNIT", length = 10)
	private String unit;

	@Column(name = "LEAD_TIME")
	private int leadTime = 1;

	@Column(name = "IS_DELIVERD_TOLERANCE", length = 1)
	private String isDeliverdTolerance = "Y";

	@Column(name = "MIN_PO_QUANTITY")
	private int minPoQuantity = 1;

	@Column(name = "MAX_PO_QUANTITY")
	private int maxPoQuantity = 10;

	@Column(name = "TEMPERATURE_TYPE")
	private int temperatureType;

	@Column(name = "IS_RETURN_PICKUP", length = 1)
	private String isReturnPickup = "Y";

	@Column(name = "IS_RETURNABLE", length = 1)
	private String isReturnable;

	@Column(name = "Deliver_Geo_Range", length = 5)
	private String deliverGeoRange = "1";

	@Column(name = "PRPS_STATUS")
	private int status;

	@Column(name = "PM_ID", length = 30)
	private String pmId;

	@Column(name = "PRODUCT_ID", length = 8)
	private String productId;

	@Column(name = "PRPS_MEMO", length = 1000)
	private String meno;

	@Column(name = "PROPOSE_PRODUCT_BATCH_ID", length = 11)
	private String proposeProductBatchId;

	/**
	 * 結束時間
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "END_DATE")
	private Date endDate;

	/**
	 * 审核時間
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "APPROVE_DATE")
	private Date approveDate;

	/**
	 * 關健字
	 */
	@Column(name = "PRODUCT_KEYWORD", length = 500)
	private String productKeyword;

	// 正方形
	@Column(name = "PROPOSE_PRODUCT_MAIN_IMG", length = 200)
	private String proposeProductMainImg;

	// 長方形
	@Column(name = "PROPOSE_PRODUCT_RMAIN_IMG", length = 200)
	private String proposeProductRMainImg;

	@Column(name = "PROPOSE_PRODUCT_DESC_IMG", length = 1000)
	private String proposeProductDescImg;

	@Column(name = "SUPPLIER_ID", length = 6)
	private String supplierId;

	@Column(name = "PROPOSE_PRODUCT_PRDT_IMG", length = 1000)
	private String proposeProductPrdtImg;

	/**
	 * 是否为scm转单 Y:SCM,N:PO,B:BO
	 */
	@Column(name = "IS_SCM", length = 1)
	private String isScm;

	/*
	 * 提报的耀点价（会员价）
	 */
	@Column(name = "PRPS_SHELF_PRICE", columnDefinition = "numeric(10,2)")
	private BigDecimal prpsShelfPrice;

	/**
	 * 效期管理分类
	 */
	@Column(name = "EXPIRE_MANAGE", length = 4)
	private String expireManage = "EM01";

	/**
	 * 是否需要防拆包材
	 */
	@Column(name = "IS_ANTI_UNPACKING", length = 1)
	private String isAntiUnpacking = "N";

	/**
	 * 长形图/方形图(S:方形圖,R:長形圖)
	 */
	@Column(name = "PRODUCT_GRAPHIC_TYPE", length = 1)
	private String graphicType = "S";

	/**
	 * 是否使用"订购后几日出货"?(default N ,Y:是,N:否)
	 */
	@Column(name = "USE_DELIVERY_DAY", length = 1)
	private String useDeliveryDay = "N";

	/**
	 * 订购后几日出货(default 0)
	 */
	@Column(name = "DELIVERY_DAY")
	private int deliveryDay = 0;

	/**
	 * 台湾馆供应商
	 */
	@Column(name = "TW_SUPPLIER_ID", length = 6)
	private String twSupplierId;

	/**
	 * 主規格標籤
	 */
	@Column(name = "MAIN_CODE_LABEL", length = 10)
	private String mainCodeLabel;

	/**
	 * 主規格名稱集合
	 */
	@Column(name = "MAIN_SPEC_NAME", length = 2000)
	private String mainSpecName;

	/**
	 * 次規格標籤
	 */
	@Column(name = "SECOND_CODE_LABEL", length = 10)
	private String secondCodeLabel;

	/**
	 * 次規格名稱集合
	 */
	@Column(name = "SECOND_SPEC_NAME", length = 2000)
	private String secondSpecName;

	/**
	 * 資料來源
	 */
	@Column(name = "DATA_SRC", length = 20)
	private String dataSrc;

	/**
	 * 操作步驟
	 */
	@Column(name = "STEP_FLAG", columnDefinition = "numeric(10,2)")
	private BigDecimal stepFlag;

	/**
	 * PM所屬單位
	 */
	@Column(name = "ORGANIZATION_PATH", length = 50)
	private String organizationPath;

	/**
	 * 预计出货日
	 */
	@Column(name = "EXPECT_SHIP_DATE")
	@Temporal(TemporalType.TIMESTAMP)
	private Date expectShipDate;

	/**
	 * 退换货条件
	 */
	@Column(name = "RETURN_RULE", length = 5)
	private String returnRule = "07_15";

	public String getBrand() {
		return brand;
	}

	public String getBrief() {
		return brief;
	}

	public BigDecimal getCost() {
		return cost;
	}

	/**
	 * @return the deliverGeoRange
	 */
	public String getDeliverGeoRange() {
		return deliverGeoRange;
	}

	public String getDescription() {
		return description;
	}

	public String getDetails() {
		return details;
	}

	public BigDecimal getHeight() {
		return height;
	}

	public String getId() {
		return id;
	}

	public String getIsDelete() {
		return isDelete;
	}

	public String getIsDeliverdTolerance() {
		return isDeliverdTolerance;
	}

	public String getIsReturnable() {
		return isReturnable;
	}

	public String getIsReturnPickup() {
		return isReturnPickup;
	}

	public String getIsScm() {
		return isScm;
	}

	public String getIsVirtual() {
		return isVirtual;
	}

	public int getLeadTime() {
		return leadTime;
	}

	public BigDecimal getLength() {
		return length;
	}

	public BigDecimal getListPrice() {
		return listPrice;
	}

	public int getMaxPoQuantity() {
		return maxPoQuantity;
	}

	public String getMeno() {
		return meno;
	}

	public int getMinPoQuantity() {
		return minPoQuantity;
	}

	public String getName() {
		return name;
	}

	public String getPmId() {
		return pmId;
	}

	public String getProductId() {
		return productId;
	}

	/**
	 * @return the productKeyword
	 */
	public String getProductKeyword() {
		return productKeyword;
	}

	public int getProposeCategoryId() {
		return proposeCategoryId;
	}

	public String getProposeProductBatchId() {
		return proposeProductBatchId;
	}

	/**
	 * @return the proposeProductDescImg
	 */
	public String getProposeProductDescImg() {
		return proposeProductDescImg;
	}

	/**
	 * @return the proposeProductMainImg
	 */
	public String getProposeProductMainImg() {
		return proposeProductMainImg;
	}

	public String getProposeProductPrdtImg() {
		return proposeProductPrdtImg;
	}

	public BigDecimal getPrpsShelfPrice() {
		return prpsShelfPrice;
	}

	public int getStatus() {
		return status;
	}

	public String getSupplierId() {
		return supplierId;
	}

	public String getTaxClass() {
		return taxClass;
	}

	public int getTemperatureType() {
		return temperatureType;
	}

	public int getType() {
		return type;
	}

	public String getUnit() {
		return unit;
	}

	public BigDecimal getVolume() {
		return volume;
	}

	public BigDecimal getWeight() {
		return weight;
	}

	public BigDecimal getWidth() {
		return width;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public void setBrief(String brief) {
		this.brief = brief;
	}

	public void setCost(BigDecimal cost) {
		this.cost = cost;
	}

	/**
	 * @param deliverGeoRange the deliverGeoRange to set
	 */
	public void setDeliverGeoRange(String deliverGeoRange) {
		this.deliverGeoRange = deliverGeoRange;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public void setHeight(BigDecimal height) {
		this.height = height;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	public void setIsDeliverdTolerance(String isDeliverdTolerance) {
		this.isDeliverdTolerance = isDeliverdTolerance;
	}

	public void setIsReturnable(String isReturnable) {
		this.isReturnable = isReturnable;
	}

	public void setIsReturnPickup(String isReturnPickup) {
		this.isReturnPickup = isReturnPickup;
	}

	public void setIsScm(String isScm) {
		this.isScm = isScm;
	}

	public void setIsVirtual(String isVirtual) {
		this.isVirtual = isVirtual;
	}

	public void setLeadTime(int leadTime) {
		this.leadTime = leadTime;
	}

	public void setLength(BigDecimal length) {
		this.length = length;
	}

	public void setListPrice(BigDecimal listPrice) {
		this.listPrice = listPrice;
	}

	public void setMaxPoQuantity(int maxPoQuantity) {
		this.maxPoQuantity = maxPoQuantity;
	}

	public void setMeno(String meno) {
		this.meno = meno;
	}

	public void setMinPoQuantity(int minPoQuantity) {
		this.minPoQuantity = minPoQuantity;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setPmId(String pmId) {
		this.pmId = pmId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	/**
	 * @param productKeyword the productKeyword to set
	 */
	public void setProductKeyword(String productKeyword) {
		this.productKeyword = productKeyword;
	}

	public void setProposeCategoryId(int proposeCategoryId) {
		this.proposeCategoryId = proposeCategoryId;
	}

	public void setProposeProductBatchId(String proposeProductBatchId) {
		this.proposeProductBatchId = proposeProductBatchId;
	}

	/**
	 * @param proposeProductDescImg the proposeProductDescImg to set
	 */
	public void setProposeProductDescImg(String proposeProductDescImg) {
		this.proposeProductDescImg = proposeProductDescImg;
	}

	/**
	 * @param proposeProductMainImg the proposeProductMainImg to set
	 */
	public void setProposeProductMainImg(String proposeProductMainImg) {
		this.proposeProductMainImg = proposeProductMainImg;
	}

	public void setProposeProductPrdtImg(String proposeProductPrdtImg) {
		this.proposeProductPrdtImg = proposeProductPrdtImg;
	}

	public void setPrpsShelfPrice(BigDecimal prpsShelfPrice) {
		this.prpsShelfPrice = prpsShelfPrice;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId;
	}

	public void setTaxClass(String taxClass) {
		this.taxClass = taxClass;
	}

	public void setTemperatureType(int temperatureType) {
		this.temperatureType = temperatureType;
	}

	public void setType(int type) {
		this.type = type;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public void setVolume(BigDecimal volume) {
		this.volume = volume;
	}

	public void setWeight(BigDecimal weight) {
		this.weight = weight;
	}

	public void setWidth(BigDecimal width) {
		this.width = width;
	}

	public String getExpireManage() {
		return expireManage;
	}

	public void setExpireManage(String expireManage) {
		this.expireManage = expireManage;
	}

	public String getIsAntiUnpacking() {
		return isAntiUnpacking;
	}

	public void setIsAntiUnpacking(String isAntiUnpacking) {
		this.isAntiUnpacking = isAntiUnpacking;
	}

	public String getProposeProductRMainImg() {
		return proposeProductRMainImg;
	}

	public void setProposeProductRMainImg(String proposeProductRMainImg) {
		this.proposeProductRMainImg = proposeProductRMainImg;
	}

	public String getGraphicType() {
		return graphicType;
	}

	public void setGraphicType(String graphicType) {
		this.graphicType = graphicType;
	}

	public String getUseDeliveryDay() {
		return useDeliveryDay;
	}

	public int getDeliveryDay() {
		return deliveryDay;
	}

	public void setUseDeliveryDay(String useDeliveryDay) {
		this.useDeliveryDay = useDeliveryDay;
	}

	public void setDeliveryDay(int deliveryDay) {
		this.deliveryDay = deliveryDay;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public String getTwSupplierId() {
		return twSupplierId;
	}

	public void setTwSupplierId(String twSupplierId) {
		this.twSupplierId = twSupplierId;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Date getApproveDate() {
		return approveDate;
	}

	public void setApproveDate(Date approveDate) {
		this.approveDate = approveDate;
	}

	/**
	 * @return the mainCodeLabel
	 */
	public String getMainCodeLabel() {
		return mainCodeLabel;
	}

	/**
	 * @param mainCodeLabel the mainCodeLabel to set
	 */
	public void setMainCodeLabel(String mainCodeLabel) {
		this.mainCodeLabel = mainCodeLabel;
	}

	/**
	 * @return the mainSpecName
	 */
	public String getMainSpecName() {
		return mainSpecName;
	}

	/**
	 * @param mainSpecName the mainSpecName to set
	 */
	public void setMainSpecName(String mainSpecName) {
		this.mainSpecName = mainSpecName;
	}

	/**
	 * @return the secondCodeLabel
	 */
	public String getSecondCodeLabel() {
		return secondCodeLabel;
	}

	/**
	 * @param secondCodeLabel the secondCodeLabel to set
	 */
	public void setSecondCodeLabel(String secondCodeLabel) {
		this.secondCodeLabel = secondCodeLabel;
	}

	/**
	 * @return the secondSpecName
	 */
	public String getSecondSpecName() {
		return secondSpecName;
	}

	/**
	 * @param secondSpecName the secondSpecName to set
	 */
	public void setSecondSpecName(String secondSpecName) {
		this.secondSpecName = secondSpecName;
	}

	/**
	 * @return the dataSrc
	 */
	public String getDataSrc() {
		return dataSrc;
	}

	/**
	 * @param dataSrc the dataSrc to set
	 */
	public void setDataSrc(String dataSrc) {
		this.dataSrc = dataSrc;
	}

	/**
	 * @return the stepFlag
	 */
	public BigDecimal getStepFlag() {
		return stepFlag;
	}

	/**
	 * @param stepFlag the stepFlag to set
	 */
	public void setStepFlag(BigDecimal stepFlag) {
		this.stepFlag = stepFlag;
	}

	/**
	 * @return the organizationPath
	 */
	public String getOrganizationPath() {
		return organizationPath;
	}

	/**
	 * @param organizationPath the organizationPath to set
	 */
	public void setOrganizationPath(String organizationPath) {
		this.organizationPath = organizationPath;
	}

	/**
	 * @return the expectShipDate
	 */
	public Date getExpectShipDate() {
		return expectShipDate;
	}

	/**
	 * @param expectShipDate the expectShipDate to set
	 */
	public void setExpectShipDate(Date expectShipDate) {
		this.expectShipDate = expectShipDate;
	}

	public String getReturnRule() {
		return returnRule;
	}

	public void setReturnRule(String returnRule) {
		this.returnRule = returnRule;
	}

}